package com.zhuangjie.mvc.validator.annotate;

import com.zhuangjie.mvc.validator.handler.ValidIntegerConstraintValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = {ValidIntegerConstraintValidator.class})
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidInteger {
    // 拷贝其它检验注解的1
    String message() default "{javax.validation.constraints.NotBlank.message}";
    // 拷贝其它检验注解的2
    Class<?>[] groups() default {};
    // 拷贝其它检验注解的3
    Class<? extends Payload>[] payload() default {};
    // 我们自定义的属性
    int[] value() default {};
}
